function xi=construct_xi_ext_normal(x,n,k,factor_extend,mu,sd)

a = min(x)-0.001;
b = max(x)+0.001;
  
phi_a=mynormcdf(a,mu,sd);
phi_b=mynormcdf(b,mu,sd);

xi_n_phi=linspace(phi_a,phi_b,n+1)';
xi_n=mynorminv(xi_n_phi,mu,sd);

xi_neg = xi_n(1,1) + factor_extend*(b-a)*(-k:1:-1)';
xi_pos = xi_n(n+1,1) + factor_extend*(b-a)*(1:1:k)';

xi = [xi_neg; xi_n; xi_pos];

    %
